Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: fix ESM path resolution on Windows #29574

Closed
wants to merge 1 commit into from
Closed

src: fix ESM path resolution on Windows #29574

wants to merge 1 commit into from

Conversation

Hakerh400
Copy link
Contributor

@Hakerh400 Hakerh400 commented Sep 16, 2019

Windows has some reserved file names such as con, prn, nul, etc. Such files can be accessed only if the path is prefixed with \\.\

Fixes #29572

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Sep 16, 2019
@bnoordhuis
Copy link
Member

Can you add regression tests?

@Trott
Copy link
Member

Trott commented Sep 16, 2019

@nodejs/platform-windows @nodejs/modules-active-members

Copy link
Contributor

@guybedford guybedford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL!

Thanks for the PR, it looks great to merge as-is, I've just commented on if there might be more cases to catch, but let me know if the case mentioned isn't actually an issue.

src/module_wrap.cc Outdated Show resolved Hide resolved
Windows has some reserved file names such as "con", "prn",
"nul", etc. Such files can be accessed only if the path is
prefixed with "\\.\"
@Trott Trott added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Sep 24, 2019
@nodejs-github-bot
Copy link
Collaborator

@Trott
Copy link
Member

Trott commented Sep 24, 2019

@nodejs/collaborators This is good to land, but might benefit from another review, especially from someone who uses Windows.

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@Trott
Copy link
Member

Trott commented Oct 4, 2019

Landed in 6265e41

@Trott Trott closed this Oct 4, 2019
Trott pushed a commit that referenced this pull request Oct 4, 2019
Windows has some reserved file names such as "con", "prn",
"nul", etc. Such files can be accessed only if the path is
prefixed with "\\.\"

PR-URL: #29574
Reviewed-By: Guy Bedford <[email protected]>
@Hakerh400 Hakerh400 deleted the esm branch October 4, 2019 05:38
BridgeAR pushed a commit that referenced this pull request Oct 9, 2019
Windows has some reserved file names such as "con", "prn",
"nul", etc. Such files can be accessed only if the path is
prefixed with "\\.\"

PR-URL: #29574
Reviewed-By: Guy Bedford <[email protected]>
@BridgeAR BridgeAR mentioned this pull request Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Module not found when module is named con.js with --experimental-modules
6 participants